using System;
using System.Collections.Generic;
using System.Text;
using SDMX_Common = SDMX_ML.Framework.Common;

namespace SDMX_ML.Framework.Structure
{
    public class GroupType
    {
        private SDMX_Common.IDType _id;

        public GroupType(SDMX_Common.IDType id)
        {
            if (id != null)
            {
                _dimensionRef = new List<SDMX_Common.IDType>();
                _description = new List<SDMX_Common.TextType>();

                _id = id;
            }
            else
            {
                throw new Exception("Attribute id is a required field");
            }
        }

        public GroupType(string id)
        {
            if (!String.IsNullOrEmpty(id))
            {
                _dimensionRef = new List<SDMX_Common.IDType>();
                _description = new List<SDMX_Common.TextType>();

                _id = new SDMX_Common.IDType(id);
            }
            else
            {
                throw new Exception("Attribute id is a required field");
            }
        }

        public SDMX_Common.IDType Id
        {
            get { return _id; }
            set { _id = value; }
        }
        private List<SDMX_Common.IDType> _dimensionRef;

        public List<SDMX_Common.IDType> DimensionRef
        {
            get { return _dimensionRef; }
            set { _dimensionRef = value; }
        }
        private SDMX_Common.IDType _attachmentConstraintRef;

        public SDMX_Common.IDType AttachmentConstraintRef
        {
            get { return _attachmentConstraintRef; }
            set { _attachmentConstraintRef = value; }
        }
        private List<SDMX_Common.TextType> _description;

        public List<SDMX_Common.TextType> Description
        {
            get { return _description; }
            set { _description = value; }
        }
        private SDMX_Common.AnnotationsType _annotations;

        public SDMX_Common.AnnotationsType Annotations
        {
            get { return _annotations; }
            set { _annotations = value; }
        }
    }
}
